import { createApp } from 'vue'

import App from './App.vue'


import router from "./router"

// eventbus
import bus from "./utils/bus"


// 引入element
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 引入less
import "./assets/global.less"

import "./assets/el-reset.less"

// 引入路由钩子
import "./utils/routerHook"


import {createPinia} from "pinia"

// 引入pinia持久化存储的创建
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"

let pinia = createPinia()
//使用持久化存储
pinia.use(piniaPluginPersistedstate)



let app=createApp(App)
app.use(pinia)



// 将bus添加到全局
app.config.globalProperties.$bus = bus;

app.use(router)


app.use(ElementPlus)

app.mount('#app')
